﻿

--获取导航 二级
CREATE PROCEDURE [dbo].[proc_App_Function_GetList]
	(
	 @Mid VARCHAR(50),
	 @temp INT
	)
AS
IF(@temp=2)
BEGIN
	Select
	ID,
	MID,
	MName,
	MPath,
	Msort,
	Mark,
	EntryPeople,
	EntryTime		
	From App_Menu Where Mark=0 and SUBSTRING(MID,1,2)=@Mid AND LEN(MID)>3 Order by Msort	
END
ELSE 
	BEGIN
	Select
	ID,
	MID,
	MName,
	MPath,
	Msort,
	Mark,
	EntryPeople,
	EntryTime		
	From App_Menu Where Mark=1 and SUBSTRING(MID,1,4)=@Mid AND LEN(MID)>5 AND LEN(MID)<7 Order by Msort	
	END
RETURN	


